<%@page contentType="text/html;charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>当当网--购物车</title>
		<!-- 引入外部 css 文件 -->
		<link rel="stylesheet" href="../css/tarena.css" type="text/css" />
		<link rel="stylesheet" href="../css/gwap.css" type="text/css" />
		<!-- 引入外部 js 文件 -->
		<script language="JavaScript" src="../js/tarena.js"></script>
		<script language="javascript">
	function updateNum(url, name) {
		if (!isDecimal("document.cartForm." + name, "数量不能为空，必需为数字"))
			return false;
		var v1 = "";
		var value = "v1=document.cartForm." + name + ".value";
		eval(value);
		url += v1;
		location = url;
	}
</script>
	</head>
	<body>
		<div align="center">
			<!--页头 开始-->
			<%@include file="../common/head.jsp"%>
			<!--页头 结束-->


			<table width="962" border="0" cellpadding="0" cellspacing="0"
				class="BorderLRSolidF9FEAD">
				<tr>
					<td>
						<table width="100%" border="0">
							<tr>
								<td width="30%" align="left">
									<img class="pic_shop"
										src="../images/shopcart/pic_myshopping.gif" title="我的购物车" />
								</td>
								<td align="left">
									9周年店庆，全场免普通快递送货上门费和普通邮递费
								</td>

							</tr>
						</table>
					</td>
				</tr>


				<tr>
					<td valign="top">
						<table
							style="width: 944px; border-collapse: collapse; line-height: 35px"
							class="bottom_solid_gray">
							<tr class="tabl_buy_title">
								<td class="buy_td_6">
									<span>序号</span>
								</td>
								<td>
									<span class="span_w1">商品名</span>
								</td>
								<td class="buy_td_5">
									<span class="span_w2">&nbsp;&nbsp;市场价</span>
								</td>
								<td class="buy_td_4">
									<span class="span_w3">&nbsp;&nbsp;&nbsp;&nbsp;当当价</span>
								</td>
								<td class="buy_td_1">
									<span class="span_w2">数量</span>
								</td>
								<td class="buy_td_2">
									<span>变更数量</span>
								</td>
								<td class="buy_td_1">
									<span>删除</span>
								</td>
							</tr>


							<s:iterator value="cart.cartItems" var="item" status="st">
								<tr class='td_no_bord'>
									<td>
										<s:property value="#st.count" />
									</td>
									<td>
										${item.product.productName}
									</td>

									<td class="buy_td_5">
										<span class="c_gray">￥${item.product.fixedPrice}</span>
									</td>
									<td class="buy_td_4">
										&nbsp;&nbsp;
										<span>￥${item.product.dangPrice}</span>
									</td>
									<td class="buy_td_1">
										&nbsp;&nbsp;${item.number}
									</td>

									<td class="buy_td_1">
										<input class="del_num" type="text" size="3" maxlength="4"
											id="it_${item.product.id}" value='${item.number}' />
										<a href="javascript:;"
											onclick="location='updatecart.action?productId=${item.product.id}&number='+$('it_${item.product.id}').value">变更</a>
									</td>
									<td class="buy_td_1">
										<a href="javascript:;"
											onclick="location='dropitem.do?productId=${item.product.id}'">删除</a>
									</td>
								</tr>
							</s:iterator>

						</table>
					</td>
				</tr>

				<tr>
					<!-- START 用户删除恢复区 -->
					<td valign="top">
						<table
							style="width: 944px; border-collapse: collapse; line-height: 35px"
							class="bottom_solid_gray">

							<s:iterator value="cart.cartItems" var="item" status="st">
								<tr class='td_no_bord'>
									<td>
										<s:property value="#st.count" />
									</td>
									<td>
										${item.product.productName}
									</td>

									<td class="buy_td_5">
										<span class="c_gray">￥${item.product.fixedPrice}</span>
									</td>
									<td class="buy_td_4">
										&nbsp;&nbsp;
										<span>￥${item.product.dangPrice}</span>
									</td>
									<td class="buy_td_1">
										&nbsp;&nbsp;${item.number}
									</td>

									<td>
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										&nbsp;&nbsp;&nbsp;
									</td>
									<td class="buy_td_1">
										<a href="javascript:;"
											onclick="location='dropitem.do?productId=${item.product.id}'">恢复</a>
									</td>
								</tr>
							</s:iterator>
						</table>
					</td>
					<!-- END 用户删除恢复区 -->
				</tr>



				





				<tr>
					<td>
						<img src='../images/shopcart/tuijianshangping.jpg' alt='推荐商品' />
					</td>
				</tr>
			</table>
			<table width="962" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="962" height="10">

					</td>
				</tr>
			</table>

			<!-- 新手上路系列以及页尾开始 -->


			<!-- 新手上路系列以及页尾 结束 -->
		</div>
	</body>
</html>
